<div class="sidebar_detail">
	<div class="tab-header">
		<div class="title">
			<i class="fa fa-home"></i>新建班期
		</div>
		<div class="tool">
			<button type="button" class="btn btn-default" ng-click="addSupport.save()" ng-disabled="addTimetableForSaveForm.$invalid">
				<i class="fa fa-outdent"></i>保存
			</button>
		</div>
	</div>
	<!-- Nav tabs -->
	<ul class="nav nav-tabs" style="clear: both">
		<!-- tab使用: -->
		<li class="active"><a data-target="#productTimetableBaseInfo" data-toggle="tab">基本信息</a></li>
	</ul>
	<!-- Tab panels -->
	<div class="tab-content">
		<!-- 班期 -->
		<div class="tab-pane active" id="productTimetableBaseInfo">
			<form name="addTimetableForm" novalidate>
				<div class="row">
					<div class="col-md-6 form-horizontal" style="margin-left: -26px;">
						<div class="form-group">
							<label class="col-md-4 col-sm-2 control-label"> <span
								class="notNull">*</span>开始时间:
							</label>
							<div class="col-md-8 col-sm-10">
								<input id="startDate" name="startDate" type="text" class="form-control" ng-model="addSupport.bind.timetable.startDate" required>
								<span class="glyphicon glyphicon-ok form-control-feedback" ng-show="addTimetableForm.startDate.$dirty && addTimetableForm.startDate.$valid"></span>
							</div>
						</div>
					</div>
					<div class="col-md-6 form-horizontal" style="margin-left: -26px;">
						<div class="form-group">
							<label class="col-md-4 col-sm-2 control-label"> <span
								class="notNull">*</span>结束时间:
							</label>
							<div class="col-md-8 col-sm-10">
								<input id="endDate" name="endDate" type="text" class="form-control" ng-model="addSupport.bind.timetable.endDate" required>
								<span class="glyphicon glyphicon-ok form-control-feedback" ng-show="addTimetableForm.endDate.$dirty && addTimetableForm.endDate.$valid"></span>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12 form-horizontal" style="margin-left: -26px;">
						<div class="form-group">
							<label class="col-md-2 col-sm-2 control-label"> <span
									class="notNull">*</span>策略:
							</label>
							<div class="col-md-10 col-sm-10">
								<label class="checkbox-inline">
									<input type="checkbox" name="checkbox" ng-value="1" ng-model="addSupport.bind.week.mon">
									星期一
								</label>
								<label class="checkbox-inline">
									<input type="checkbox" name="checkbox" ng-value="2" ng-model="addSupport.bind.week.tue">
									星期二
								</label>
								<label class="checkbox-inline">
									<input type="checkbox" name="checkbox" ng-value="3" ng-model="addSupport.bind.week.wed">
									星期三
								</label>
								<label class="checkbox-inline">
									<input type="checkbox" name="checkbox" ng-value="4" ng-model="addSupport.bind.week.thur">
									星期四
								</label>
								<label class="checkbox-inline">
									<input type="checkbox" name="checkbox" ng-value="5" ng-model="addSupport.bind.week.fri">
									星期五
								</label>
								<label class="checkbox-inline">
									<input type="checkbox" name="checkbox" ng-value="6" ng-model="addSupport.bind.week.sat">
									星期六
								</label>
								<label class="checkbox-inline">
									<input type="checkbox" name="checkbox" ng-value="7" ng-model="addSupport.bind.week.sun">
									星期日
								</label>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-6 form-horizontal" style="margin-left: -26px;">
						<div class="form-group">
							<label class="col-md-4 col-sm-2 control-label"> <span
								class="notNull">*</span>成人成本:
							</label>
							<div class="col-md-8 col-sm-10">
								<input id="costPrice" name="costPrice" type="number" min="0" class="form-control" ng-model="addSupport.bind.timetable.costPrice" required>
								<span class="glyphicon glyphicon-ok form-control-feedback" ng-show="addTimetableForm.costPrice.$dirty && addTimetableForm.costPrice.$valid"></span>
							</div>
						</div>
					</div>
					<div class="col-md-6 form-horizontal" style="margin-left: -26px;">
						<div class="form-group">
							<label class="col-md-4 col-sm-2 control-label"> <span
								class="notNull">*</span>成人价格:
							</label>
							<div class="col-md-8 col-sm-10">
								<input id="salePriceAdult" name="salePriceAdult" type="number" min="0" class="form-control" ng-model="addSupport.bind.timetable.salePriceAdult" required>
								<span class="glyphicon glyphicon-ok form-control-feedback" ng-show="addTimetableForm.salePriceAdult.$dirty && addTimetableForm.salePriceAdult.$valid"></span>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-6 form-horizontal" style="margin-left: -26px;">
						<div class="form-group">
							<label class="col-md-4 col-sm-2 control-label"> <span
								class="notNull">*</span>儿童成本:
							</label>
							<div class="col-md-8 col-sm-10">
								<input id="costPriceChild" name="costPriceChild" type="number" min="0" class="form-control" ng-model="addSupport.bind.timetable.costPriceChild" required>
								<span class="glyphicon glyphicon-ok form-control-feedback" ng-show="addTimetableForm.costPriceChild.$dirty && addTimetableForm.costPriceChild.$valid"></span>
							</div>
						</div>
					</div>
					<div class="col-md-6 form-horizontal" style="margin-left: -26px;">
						<div class="form-group">
							<label class="col-md-4 col-sm-2 control-label"> <span
								class="notNull">*</span>儿童价格:
							</label>
							<div class="col-md-8 col-sm-10">
								<input id="salePriceChild" name="salePriceChild" type="number" min="0" class="form-control" ng-model="addSupport.bind.timetable.salePriceChild" required>
								<span class="glyphicon glyphicon-ok form-control-feedback" ng-show="addTimetableForm.salePriceChild.$dirty && addTimetableForm.salePriceChild.$valid"></span>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-6 form-horizontal" style="margin-left: -26px;">
						<div class="form-group">
							<label class="col-md-4 col-sm-2 control-label"> <span
								class="notNull">*</span>其他成本:
							</label>
							<div class="col-md-8 col-sm-10">
								<input id="costPriceOther" name="costPriceOther" type="number" min="0" class="form-control" ng-model="addSupport.bind.timetable.costPriceOther" required>
								<span class="glyphicon glyphicon-ok form-control-feedback" ng-show="addTimetableForm.costPriceOther.$dirty && addTimetableForm.costPriceOther.$valid"></span>
							</div>
						</div>
					</div>
					<div class="col-md-6 form-horizontal" style="margin-left: -26px;">
						<div class="form-group">
							<label class="col-md-4 col-sm-2 control-label"> <span
								class="notNull">*</span>其他价格:
							</label>
							<div class="col-md-8 col-sm-10">
								<input id="salePriceOther" name="salePriceOther" type="number" min="0" class="form-control" ng-model="addSupport.bind.timetable.salePriceOther" required>
								<span class="glyphicon glyphicon-ok form-control-feedback" ng-show="addTimetableForm.salePriceOther.$dirty && addTimetableForm.salePriceOther.$valid"></span>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-6 form-horizontal" style="margin-left: -26px;">
						<div class="form-group">
							<label class="col-md-4 col-sm-2 control-label"> <span
								class="notNull">*</span>数量:
							</label>
							<div class="col-md-8 col-sm-10">
								<input id="personNum" name="personNum" type="number" min="0" class="form-control" ng-model="addSupport.bind.timetable.personNum" required>
								<span class="glyphicon glyphicon-ok form-control-feedback" ng-show="addTimetableForm.personNum.$dirty && addTimetableForm.personNum.$valid"></span>
							</div>
						</div>
					</div>
					<div class="col-md-6 form-horizontal" style="margin-left: -26px;">
						<div class="form-group">
							<label class="col-md-4 col-sm-2 control-label"> <span
								class="notNull">*</span>余量:
							</label>
							<div class="col-md-8 col-sm-10">
								<input id="restPersonNum" name="restPersonNum" type="number" min="0" class="form-control" ng-model="addSupport.bind.timetable.restPersonNum" min="0" required>
								<span class="glyphicon glyphicon-ok form-control-feedback" ng-show="addTimetableForm.restPersonNum.$dirty && addTimetableForm.restPersonNum.$valid"></span>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12 form-horizontal" style="margin-left: -26px;">
						<div class="form-group">
							<label class="col-sm-2 control-label">描述:</label>
							<div class="col-sm-8">
								<textarea id="tripDescription" name="tripDescription" class="form-control" rows="5" ng-model="addSupport.bind.timetable.description" ng-maxlength="300"></textarea>
								<span class="error_tips" ng-show="addTimetableForm.tripDescription.$error.maxlength">最多不能超过300个字符！</span>
							</div>
							<div class="col-sm-2">
								<button type="button" class="btn btn-default" ng-click="addSupport.addTimetable()" ng-disabled="addTimetableForm.$invalid">
									<i class="fa fa-outdent"></i>添加
								</button>
							</div>
						</div>
					</div>
				</div>
			</form>
			<div class="row timetable">
				<ul>
					<li>
						<div class="row">
							<div class="col-md-2">时间</div>
							<div class="col-md-1">数量</div>
							<div class="col-md-1">余量</div>
							<div class="col-md-1">成人成本</div>
							<div class="col-md-1">成人</div>
							<div class="col-md-1">儿童成本</div>
							<div class="col-md-1">儿童</div>
							<div class="col-md-1">其他成本</div>
							<div class="col-md-2">其他</div>
						</div>
					</li>
					<li ng-repeat="(index, item) in addSupport.entity.timetable">
						<div class="row">
							<div class="col-md-2">{{ item.date }}</div>
							<div class="col-md-1">{{ item.personNum }}</div>
							<div class="col-md-1">{{ item.restPersonNum }}</div>
							<div class="col-md-1">{{ item.costPrice }}</div>
							<div class="col-md-1">{{ item.salePriceAdult }}</div>
							<div class="col-md-1">{{ item.costPriceChild }}</div>
							<div class="col-md-1">{{ item.salePriceChild }}</div>
							<div class="col-md-1">{{ item.costPriceOther }}</div>
							<div class="col-md-2">{{ item.salePriceOther }}<i class="fa fa-times del" ng-click="addSupport.entity.timetable.splice(index,1);addSupport.bind.isOk = addSupport.entity.timetable.length > 0 ? true :  undefined;"></i></div>
						</div>
					</li>
				</ul>
			</div>
		</div>
		<form name="addTimetableForSaveForm" novalidate>
			<input name="type" type="hidden" class="form-control" ng-model="addSupport.bind.isOk" required>
		</form>
	</div>
</div>